package com.rd.teacher.jichao.day15.producer3;

import java.util.concurrent.ArrayBlockingQueue;

public class Test {

    public static void main(String[] args) {

        ArrayBlockingQueue<Integer> queue =
                new ArrayBlockingQueue<>(10);
        new Thread(new Producer(queue), "Producer-1").start();
//        new Thread(new Producer(queue), "Producer-2").start();
//        new Thread(new Producer(queue), "Producer-3").start();


        new Thread(new Consumer(queue), "Consumer-1").start();
        new Thread(new Consumer(queue), "Consumer-2").start();
//        new Thread(new Consumer(container), "Consumer-3").start();
    }
}
